/**
 * 
 */
package com.qiaoan.back.model.sys;

import java.util.ArrayList;
import java.util.List;

/**
 * @see 菜单
 * @author zhang_chong521
 *
 */
public class MenuModel extends BaseModel {
	
	
	private Integer pid;
	
	private String menu_name ;
	
	private String url ;
	
	private Integer type ;
	
	private Integer level ;

	//角色
	private Integer role_id ;

	//是否可用
	private Integer enable = 1 ;

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public String getMenu_name() {
		return menu_name;
	}

	public void setMenu_name(String menu_name) {
		this.menu_name = menu_name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getRole_id() {
		return role_id;
	}

	public void setRole_id(Integer role_id) {
		this.role_id = role_id;
	}

	public Integer getEnable() {
		return enable;
	}

	public void setEnable(Integer enable) {
		this.enable = enable;
	}

	@Override
	public String toString() {
		return "MenuModel{" +
				"pid=" + pid +
				", menu_name='" + menu_name + '\'' +
				", url='" + url + '\'' +
				", type=" + type +
				", level=" + level +
				", role_id=" + role_id +
				", enable=" + enable +
				'}';
	}

	//获取子菜单
	private List<MenuModel> childMenus ;

	public void setChildMenus(List<MenuModel> childMenus) {

		this.childMenus = childMenus ;

	}

	public List<MenuModel> getChildMenus() {

		if (childMenus == null){

			childMenus = new ArrayList<MenuModel>();
		}
		return childMenus;
	}

}
